<?php
/** 
 * 订单汇总提货码表模型
 *
 * @author   xionggan
 * @date     2019-09-17
 */

namespace app\common\model;

use think\Model;

class CoreOrderPick extends Model
{
    protected $name  = 'core_order_pick';
    protected $error = null;

    // 追加属性
    protected $append = [
        'pick_qr_r'
    ];

    const STATUS_0 = 0; //待扫
    const STATUS_1 = 1; //已扫
    const STATUS_2 = 2; //已提
    
    /**
     * 获取错误信息
     * @return  string   错误信息
     */
    public function getError()
    {
        return $this->error;
    }

    public function getPickQrRAttr($value, $data)
    {
        return empty($data['pick_qr']) ? '' : get_img_url($data['pick_qr'], 300);
    }

}
